import request from '@/utils/request'

// 查询老师列表
export function getTeacherList(query) {
  return request({
    url: '/jbl-user-center/api/v1/userProfile/getAdminTeacherList',
    method: 'get',
    params: query
  })
}

// 获取教师详情
export function getTeacherInfo(query) {
  return request({
    url: '/jbl-user-center/api/v1/userProfile/getTeacher',
    method: 'get',
    params: query
  })
}

// 添加老师
export function submitTeacher(data) {
  return request({
    url: '/jbl-user-center/api/v1/userProfile/admin/add',
    method: 'post',
    data
  })
}
// 查询所有层级列表
export function getLevelList(query) {
  return request({
    url: '/jbl-user-center/api/v1/teacherHierarchy/list',
    method: 'get',
    params: query
  })
}
// 查询授课方式列表
export function getTeacherMode(query) {
  return request({
    url: '/jbl-user-center/api/v1/teacherMode/list',
    method: 'get',
    params: query
  })
}
// 获取省份
export function getProvince(query) {
  return request({
    url: '/jbl-user-center/api/v1/address/province/list',
    method: 'get',
    params: query
  })
}
// 根据provinceCode获取市
export function getCity(query) {
  return request({
    url: '/jbl-user-center/api/v1/address/city/list',
    method: 'get',
    params: query
  })
}
// 根据市cityCode查询区
export function getArea(query) {
  return request({
    url: '/jbl-user-center/api/v1/address/area/list',
    method: 'get',
    params: query
  })
}
// 求职状态
export function getJobStatus(query) {
  return request({
    url: '/jbl-user-center/api/v1/jobWanted/list',
    method: 'get',
    params: query
  })
}
// 获取到岗时间
export function getArriveTime(query) {
  return request({
    url: '/jbl-user-center/api/v1/entryTime/list',
    method: 'get',
    params: query
  })
}
// 获取福利
export function getWelfare(query) {
  return request({
    url: '/jbl-user-center/api/v1/teacherWelfare/getListByBusiness',
    method: 'get',
    params: query
  })
}
// 获取学历
export function getEducation(query) {
  return request({
    url: '/jbl-user-center/api/v1/teacherEducation/list',
    method: 'get',
    params: query
  })
}

// 获取公司名单
export function getCompany(query) {
  return request({
    url: '/jbl-business/api/admin/v1/business/getByBusinessName',
    method: 'get',
    params: query
  })
}

// 教师投递和机构邀请列表
export function getDeliverAndInviteList(query) {
  return request({
    url: '/jbl-user-center/api/v1/invitation/getByConditionsPage',
    method: 'get',
    params: query
  })
}

// 查询职位详情
export function getPosition(query) {
  return request({
    url: '/jbl-user-center/api/v1/positionInfo/getById',
    method: 'get',
    params: query
  })
}

// 发送老师或者机构
export function sendStatus(data) {
  return request({
    url: '/jbl-user-center/api/v1/invitation/updateById',
    method: 'post',
    data
  })
}

// 添加老师根据手机号判断老师是否已经存在
export function checkTeacherPhoneDouble(query) {
  return request({
    url: '/jbl-user-center/api/v1/userProfile/getByPhone',
    method: 'get',
    params: query
  })
}

// 获取兴趣教育列表
export function getIntentionList(query) {
  return request({
    url: 'jbl-business/api/v1/category/getCategoryAll',
    method: 'get',
    params: query
  })
}
// 获取子分类的小分类
export function getIntentionListChild(query) {
  return request({
    url: '/jbl-business/api/v1/category/getByParentId',
    method: 'get',
    params: query
  })
}

// 获取学科辅导列表
export function getSubjectList(query) {
  return request({
    url: '/jbl-business/api/v1/category/getByParentId',
    method: 'get',
    params: query
  })
}

// 删除老师简历
export function deleteTeacherResume(query) {
  return request({
    url: '/jbl-user-center/api/v1/userProfile/deleteById',
    method: 'get',
    params: query
  })
}

// 编辑老师简历
export function editTeacherResume(data) {
  return request({
    url: '/jbl-user-center/api/v1/userProfile/updateByIdForAdmin',
    method: 'post',
    data
  })
}

// ------------------------------ 简历推送 ---------------------------------------------
// 根据职位查询求职老师
export function getWorkFromPosition(query) {
  return request({
    url: '/jbl-user-center/api/v1/userProfile/getAdminTeacherList',
    method: 'get',
    params: query
  })
}

// 根据机构id查询机构职位
export function getOrgWithId(query) {
  return request({
    url: '/jbl-user-center/api/v1/positionInfo/getPositionByBusinessId',
    method: 'get',
    params: query
  })
}

// 新增推荐
export function addRecommend(data) {
  return request({
    url: '/jbl-user-center/api/v1/recommend/add',
    method: 'post',
    data
  })
}
